package com.it.dao;

import com.it.base.BaseDAO;
import com.it.bean.RepplyBean;

import java.util.List;

public class RepplyDaoImpl extends BaseDAO<RepplyBean> implements RepplyDao {
    @Override
    public void addRepply(RepplyBean repplyBean) throws Exception {
        String sql = "insert into t_repply value (?,?,?,?,?) ";
        super.executeUpdate(sql, 0, repplyBean.getContent(), repplyBean.getTopicId(), repplyBean.getUid(), repplyBean.getRepplyDate());
    }

    @Override
    public List<RepplyBean> getRepplyListByTopicId(String topicId) throws Exception {
        String sql = "select * from t_repply where topicId = ?";
        return super.executeQuery(sql,topicId);
    }
}
